<!DOCTYPE html>
<html>
  <head>
    <title></title>
    <link rel='stylesheet' href='/stylesheets/style.css' />
    <style >
      a, button {
        color: #00B7FF;
        margin-top: 20px;
      }
    </style>
    <script src="/javascripts/jds-sdk.js"></script>
    <script>
      jDsSdk.config({
      debug: true,
      setting: {
        title: "大圣科技1",
        fitsStatusBar: false,
        shareWeb: {
          url: 'https://www.baidu.com',
          title: "baidu",
          thumb: "https://www.baidu.com/img/pc_cc75653cd975aea6d4ba1f59b3697455.png",
          desc: "分享测试",
          channels: ['FRIEND', 'WEIXIN'],
          extra: {
            id: 1,
            xx: "123456"
          },
        },
      }
    });
     

      function getQueryParams() {
        var params = jDsSdk.getQueryParams();
        alert(JSON.stringify(params));
      }

      function getQueryParam() {
        var param = jDsSdk.getQueryParam('a');
        alert(JSON.stringify(param));
      }

      function invokeNavigatorBack() {
        jDsSdk.invoke('navigator.goBackOrForward',{
          step: -1
        });
      }
      
      document.addEventListener('jDsServiceReady', function() {
        alert('jDsServiceReady');
      });
      
      </script>
  </head>
  
  <body>
    <h1></h1>

    <button onclick="getQueryParam()">获取url单个参数</button>  <br/>
    <button onclick="getQueryParams()">获取url全部参数</button>  <br/>
    <button onclick="invokeNavigatorBack()">返回</a>
    <a href="index1.html"></a>
  </body>
</html>

